import { createStore } from 'redux'

function log(state = {}, action: { type: string, loginAccount: string }) {
  switch (action.type) {
    case 'LOGIN':
      return action.loginAccount
    case 'LOGOUT':
      return state
    default:
      return state
  }
}

let userStore = createStore(log)

export default userStore